// Source code is decompiled from a .class file using FernFlower decompiler.
package com.interlib.license;

import java.util.Date;
import org.apache.log4j.Logger;

public class ValidSystem {
   public LocalInfo localinfo = null;
   public LicenseInfo licenseinfo = null;

   public ValidSystem() {
      this.licenseinfo = new LicenseInfo();
   }

public boolean isCanStartUp(Logger var1) {
    if (this.licenseinfo.NO_LICENSE_MSG != null) {
        System.out.println(this.licenseinfo.NO_LICENSE_MSG);
        var1.error(this.licenseinfo.NO_LICENSE_MSG);
        return false;
    } else {
        if (this.licenseinfo.LICENSE_TYPE.equals("1")) {
            System.out.println("\u60a8\u7684\u7248\u672c\u662f\u8bd5\u7528\u7248\u672c\uff0c\u8bf7\u8054\u7cfb\u5e7f\u5dde\u56fe\u521b\u8ba1\u7b97\u673a\u8f6f\u4ef6\u5f00\u53d1\u6709\u9650\u516c\u53f8\u83b7\u53d6\u6b63\u5f0f\u6388\u6743\uff01");
            var1.info("\u60a8\u7684\u7248\u672c\u662f\u8bd5\u7528\u7248\u672c\uff0c\u8bf7\u8054\u7cfb\u5e7f\u5dde\u56fe\u521b\u8ba1\u7b97\u673a\u8f6f\u4ef6\u5f00\u53d1\u6709\u9650\u516c\u53f8\u83b7\u53d6\u6b63\u5f0f\u6388\u6743\uff01");
        }
        return true;
    }
}

   public boolean isOverMaxConunt(int var1) {
      if (!this.licenseinfo.CLIENT_USER_COUNT.equals("") && var1 > Integer.parseInt(this.licenseinfo.CLIENT_USER_COUNT)) {
         return true;
      } else {
         return this.licenseinfo.CLIENT_USER_COUNT.equals("");
      }
   }

   public boolean isDateRight() {
      if (this.licenseinfo.STARTDATE != null && !this.licenseinfo.STARTDATE.equals("")) {
         if (this.licenseinfo.ENDDATE != null && !this.licenseinfo.ENDDATE.equals("")) {
            Date var1 = TimeUtil.getDate(this.licenseinfo.STARTDATE, "yyyyMMdd");
            Date var2 = TimeUtil.getDate(this.licenseinfo.ENDDATE, "yyyyMMdd");
            Date var3 = TimeUtil.trimDate(new Date());
            return var3.compareTo(var1) > 0 && var3.compareTo(var2) <= 0;
         } else {
            return false;
         }
      } else {
         return false;
      }
   }

   public boolean validDate(Logger var1) {
      if (!this.licenseinfo.NO_LICENSE_MSG.equals("")) {
         System.out.println(this.licenseinfo.NO_LICENSE_MSG);
         var1.info("main(String[]) - " + this.licenseinfo.NO_LICENSE_MSG);
         return false;
      } else {
         Date var2 = TimeUtil.getDate(this.licenseinfo.ENDDATE, "yyyyMMdd");
         Date var3 = TimeUtil.trimDate(new Date());
         if (var3.compareTo(var2) <= 0) {
            return true;
         } else {
            String var4 = TimeUtil.addDay(this.licenseinfo.ENDDATE, 7);
            var2 = TimeUtil.str2Date(var4);
            if (var3.compareTo(var2) <= 0) {
               return true;
            } else {
               var1.info("\u60a8\u5df2\u7ecf\u8d85\u51fa\u6388\u6743\u671f\u9650\uff01\u8bf7\u8054\u7cfb\u5e7f\u5dde\u56fe\u521b\u8ba1\u7b97\u673a\u8f6f\u4ef6\u5f00\u53d1\u6709\u9650\u516c\u53f8\u83b7\u53d6\u6b63\u5f0f\u6388\u6743\uff01\u60a8\u7684\u6388\u6743\u7f16\u53f7\u4e3a[" + DESUtil.myDESEncode(FindMacAddr.getMacAddress()) + "]\uff0c\u8bf7\u83b7\u53d6\u6b63\u5f0f\u6388\u6743\u65f6\u63d0\u4f9b\u6b64\u7f16\u53f7\uff01");
               return false;
            }
         }
      }
   }

   public static void main(String[] var0) {
      ValidSystem var1 = new ValidSystem();
      System.out.println(var1.isDateRight());
   }
}
